export enum Frequency {
  /**
   * 昨日
   */
  YESTER_DAY = '昨日',
  /**
   * 近一月
   */
  ONE_MONTH = '近一月',
  /**
   * 近三月
   */
  THREE_MONTH = '近三月',
  /**
   * 近6月
   */
  HALF_YEAR = '近6月',
  /**
   * 近1年
   */
  ONE_YEAR = '近1年',
}

export enum AbnormalType {
  /**净值异动 */
  NETVAL = 1,
  /**久期异动 */
  DURATION = 2,
  /**信用异动 */
  CREDIT = 3,
  /**舆情异动 */
  PUBLIC_OPINION = 4,
}
export enum NetValAbnormalType {
  DAILY_UP = 1,
  DAILY_DOWN = 2,
  WEEK_UP = 3,
  WEEK_DOWN = 4,
}

export const NetValAbnormalLabel = {
  [NetValAbnormalType.DAILY_UP]: '日超涨',
  [NetValAbnormalType.DAILY_DOWN]: '日超跌',
  [NetValAbnormalType.WEEK_UP]: '周超涨',
  [NetValAbnormalType.WEEK_DOWN]: '周超跌',
}

export const NetValAbnormalLabelLookup = Object.fromEntries(
  Object.entries(NetValAbnormalLabel).map(([key, value]) => [value, key]),
)

export enum DurationType {
  DURATION_UP = 1, //周升高
  DURATION_DOWN = 2, //周下降
}

export const DurationLabel = {
  [DurationType.DURATION_UP]: '周升高',
  [DurationType.DURATION_DOWN]: '周下降',
}

export const DurationLabelLookup = Object.fromEntries(
  Object.entries(DurationLabel).map(([key, value]) => [value, key]),
)

export const AbormalType = {
  [AbnormalType.NETVAL]: '净值异动',
  [AbnormalType.DURATION]: '久期异动',
  [AbnormalType.CREDIT]: '信用异动',
  [AbnormalType.PUBLIC_OPINION]: '舆情异动',
}

export const AbormalTypeLookup = Object.fromEntries(
  Object.entries(AbormalType).map(([key, value]) => [value, key]),
)

export enum FundType {}
